/**
 * 暴力匹配
 * @param {string} haystack
 * @param {string} needle
 * @return {number}
 */
var strStr = function(haystack, needle) {
    let l = needle.length
    for (let i = 0; i < haystack.length; i++) {
        if (haystack[i] === needle[0]) {
            let j = i
            for (let m = 0; m < l; m++) {
                if (haystack[j] !== needle[m]) {
                    break
                } else {
                    j++
                }
            }
            if (j - i === l) return i
        }
    }
    return -1
};